package com.yehebl.orm.dto;

import com.yehebl.orm.enums.IdType;

/**
 * 字段信息表
 * 
 * @author tzd
 *
 */
public class FieldInfo {
	/**
	 * id生成策略
	 */
	private IdType idType;
	/**
	 * 实体字段名称
	 */
	private String fieldName;

	/**
	 * 首字母大写实体字段名称
	 */
	private String upperFieldName;

	/**
	 * 表字段名称
	 */
	private String tableFieldName;

	/**
	 * 实体字段类型
	 */
	private Class<?> fieldType;
	
	/**
	 * 值
	 */
	private Object object;

	public String getFieldName() {
		return fieldName;
	}

	public void setFieldName(String fieldName) {
		this.fieldName = fieldName;
		if(this.fieldName.length()==1) {
			this.upperFieldName=fieldName.toUpperCase();
		}else {
			this.upperFieldName = fieldName.substring(0, 1).toUpperCase() + fieldName.substring(1);
		}
	}

	public String getTableFieldName() {
		return tableFieldName;
	}

	public void setTableFieldName(String tableFieldName) {
		this.tableFieldName = tableFieldName;
	}

	public Class<?> getFieldType() {
		return fieldType;
	}

	public void setFieldType(Class<?> fieldType) {
		this.fieldType = fieldType;
	}

	public void setFieldTypeNoColumn(Class<?> fieldType) {
		this.fieldType = fieldType;
	}

	public String getUpperFieldName() {
		return upperFieldName;
	}

	public void setUpperFieldName(String upperFieldName) {
		this.upperFieldName = upperFieldName;
	}

	public IdType getIdType() {
		return idType;
	}

	public void setIdType(IdType idType) {
		this.idType = idType;
	}

	public Object getObject() {
		return object;
	}

	public void setObject(Object object) {
		this.object = object;
	}

	
}
